<template>
  <ul class="todo-list">
    <!-- completed: 完成的类名 -->
    <li class="completed" v-for="item in todos" :key="item.id">
      <div class="view">
        <input class="toggle" type="checkbox" />
        <label>{{item.title}}</label>
        <button class="destroy" @click="Ondel(item.id)"></button>
      </div>
    </li>
  </ul>

</template>

<script>
export default {
  props: ['todos'],
  data () {
    return {

    }
  },
  methods: {
    Ondel (id) {
      this.$emit('on-del', id)
    }

  },
  created () {

  }
}
</script>
